package cn.edu.ctbu.api01.aspect;
import cn.edu.ctbu.api01.helper.R;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

@RestControllerAdvice
public class ExceptionHandle {
    @ExceptionHandler(value = Exception.class)
    public R handle(Exception e){
        return R.error(-999,e.getMessage());
    }
}